/* 
 * File:   SwitchCurrentStackMemento.cpp
 * Author: Gab'z
 * 
 * Created on 5 juin 2012, 18:04
 */

#include "SwitchCurrentStackMemento.h"
#include "../command/UndoableRedoableCommand.h"

namespace calculator {

    SwitchCurrentStackMemento::SwitchCurrentStackMemento(
            UndoableRedoableCommand* undoableRedoableCommand,
            const Integer* integer,
            int currentMementoIndex) :
    Memento(undoableRedoableCommand),
    _integer(integer),
    _currentMementoIndex(currentMementoIndex) {
    }

    SwitchCurrentStackMemento::SwitchCurrentStackMemento(const SwitchCurrentStackMemento& memento) :
    Memento(memento._undoableRedoableCommand),
    _integer(memento._integer),
    _currentMementoIndex(memento._currentMementoIndex) {
    }

    SwitchCurrentStackMemento::~SwitchCurrentStackMemento() {
        delete _integer;
    }
}
